cmake_minimum_required(VERSION 3.0.2)
project(opencv_test)
# 替换为你找到的 OpenCVConfig.cmake 的实际路径
set(OpenCV_DIR "/usr/share/OpenCV/")

find_package(catkin REQUIRED COMPONENTS
  roscpp
  sensor_msgs
  image_transport
  cv_bridge
  OpenCV
)

find_package(OpenCV REQUIRED)

catkin_package(
  CATKIN_DEPENDS roscpp sensor_msgs image_transport cv_bridge opencv
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

add_executable(image_converter src/cv_test.cpp)

target_link_libraries(cv_test
  ${catkin_LIBRARIES}
  ${OpenCV_LIBS}
)
